Legrand / Raritan Xerus™ JSON-RPC API for Remote Access Devices like KX4-101, KX3G2
Loading...
Searching...
No Matches
User.idl
1/* SPDX-License-Identifier: BSD-3-Clause */
2/*
3 * Copyright 2009 Raritan Inc. All rights reserved.
4 */
5
6#include "Role.idl"
7
8/**
9 * %User Management
10 */
11module usermgmt {
12
13 /** SNMPv3 security level */
14 enumeration SnmpV3SecLevel {
15 NO_AUTH_NO_PRIV, ///< No authentication and no privacy protocol
16 AUTH_NO_PRIV, ///< Use authentication but no privacy protocol
17 AUTH_PRIV ///< Use both, authentication and privacy protocol
18 };
19
20 /** SNMPv3 authentication protocol */
21 enumeration SnmpV3AuthProto {
22 MD5, ///< Use HMAC-MD5-96 for authentication
23 SHA1, ///< Use HMAC-SHA1-96 for authentication
24 SHA224, ///< Use HMAC-SHA224-128 for authentication
25 SHA256, ///< Use HMAC-SHA256-160 for authentication
26 SHA384, ///< Use HMAC-SHA384-256 for authentication
27 SHA512 ///< Use HMAC-SHA512-384 for authentication
28 };
29
30 /** SNMPv3 privacy protocol */
31 enumeration SnmpV3PrivProto {
32 DES, ///< Use DES encryption
33 AES128, ///< Use AES128 encryption
34 AES192, ///< Use AES192 encryption with Blumenthal key extension algorithm
35 AES256, ///< Use AES256 encryption with Blumenthal key extension algorithm
36 AES192_3DES, ///< Use AES192 encryption with 3DES/Reeder key extension algorithm
37 AES256_3DES ///< Use AES256 encryption with 3DES/Reeder key extension algorithm
38 };
39
40 /** SNMPv3 settings */
41 structure SnmpV3Settings {
42 boolean enabled; ///< SNMPv3 enabled
43 SnmpV3SecLevel secLevel; ///< Security level
44 SnmpV3AuthProto authProtocol; ///< Authentication protocol
45 boolean usePasswordAsAuthPassphrase; ///< Use account password for SNMPv3 authentication
46 boolean haveAuthPassphrase; ///< Authentication passphrase present
47 string authPassphrase; ///< Authentication passphrase; cannot be read back
48 SnmpV3PrivProto privProtocol; ///< Privacy protocol
49 boolean useAuthPassphraseAsPrivPassphrase; ///< Use authentication passphrase as privacy passphrase
50 boolean havePrivPassphrase; ///< Privacy passphrase present
51 string privPassphrase; ///< Privacy passphrase; cannot be read back
52 };
53
54 /** Auxiliary user information */
55 structure AuxInfo {
56 string fullname; ///< Full name
57 string telephone; ///< Telephone number
58 string eMail; ///< Email address
59 };
60
61 /** Preferred display unit for temperature sensors */
62 enumeration TemperatureEnum {
63 DEG_C, ///< Degrees Celsius
64 DEG_F ///< Degrees Fahrenheit
65 };
66
67 /** Preferred display unit for length measurements, e.g. device altitude */
68 enumeration LengthEnum {
69 METER, ///< Meters
70 FEET ///< Feet
71 };
72
73 /** Preferred display unit for (air) pressure sensors */
74 enumeration PressureEnum {
75 PASCAL, ///< Pascal
76 PSI ///< pound-force per square inch
77 };
78
79 /** %User preferences */
80 structure Preferences {
81 TemperatureEnum temperatureUnit; ///< Display unit for temperature sensors
82 LengthEnum lengthUnit; ///< Display unit for length measurements
83 PressureEnum pressureUnit; ///< Display unit for pressure sensors
84 };
85
86 /** %User information */
87 structure UserInfo {
88 boolean enabled; ///< \c true if the account is enabled
89 boolean locked; ///< \c true if the account cannot be deleted (r/o attribute)
90 boolean blocked; ///< \c true if the account is blocked due to failed logins
91 boolean needPasswordChange; ///< \c true to force a password change on the next login
92 boolean forceLocalAuth; ///< \c true if the account is always locally authenticated
93 AuxInfo auxInfo; ///< Auxiliary user information
94 SnmpV3Settings snmpV3Settings; ///< SNMPv3 settings
95 string sshPublicKey; ///< Public key for SSH access
96 Preferences preferences; ///< %User preferences
97 vector<int> roleIds; ///< List of role ids for this account
98 };
99
100 /**
101 * %User Capabilities
102 * Describe if certain operations can be performed for user.
103 * May require according privileges.
104 */
106 boolean canSetPassword; ///< User password is modifiable
107 boolean canSetPreferences; ///< User preferences are modifiable
108 };
109
110 /** %User interface */
111 interface User {
112
113 constant int ERR_PASSWORD_UNCHANGED = 1; ///< The new password must differ from the old password
114 constant int ERR_PASSWORD_EMPTY = 2; ///< The password must not be empty
115 constant int ERR_PASSWORD_TOO_SHORT = 3; ///< The password is too short
116 constant int ERR_PASSWORD_TOO_LONG = 4; ///< The password is too long
117 constant int ERR_PASSWORD_CTRL_CHARS = 5; ///< The password must not contain control characters
118 constant int ERR_PASSWORD_NEED_LOWER = 6; ///< The password must contain at least one lower-case character
119 constant int ERR_PASSWORD_NEED_UPPER = 7; ///< The password must contain at least one upper-case character
120 constant int ERR_PASSWORD_NEED_NUMERIC = 8; ///< The password must contain at least one numeric character
121 constant int ERR_PASSWORD_NEED_SPECIAL = 9; ///< The password must contain at least one special character
122 constant int ERR_PASSWORD_IN_HISTORY = 10; ///< The password is already in the password history
123 constant int ERR_PASSWORD_TOO_SHORT_FOR_SNMP = 11; ///< The password is too short to be used as SNMPv3 passphrase
124 constant int ERR_INVALID_ARGUMENT = 12; ///< Invalid arguments
125 constant int ERR_WRONG_PASSWORD = 13; ///< The passed-in password was wrong
126 constant int ERR_SSH_PUBKEY_DATA_TOO_LARGE = 14; ///< The ssh public key data is too large.
127 constant int ERR_SSH_PUBKEY_INVALID = 15; ///< The ssh public key is invalid.
128 constant int ERR_SSH_PUBKEY_NOT_SUPPORTED = 16; ///< The ssh public key is not supported.
129 constant int ERR_SSH_RSA_PUBKEY_TOO_SHORT = 17; ///< The ssh RSA public key is too short.
130
131 /**
132 * Get user information.
133 *
134 * @return %User information
135 */
137
138 /**
139 * Set the account password.
140 *
141 * @param password The new password
142 *
143 * @return 0 OK
144 * @return 1 The new password has to differ from old password.
145 * @return 2 The password must not be empty.
146 * @return 3 The password is too short.
147 * @return 4 The password is too long.
148 * @return 5 The password must not contain control characters.
149 * @return 6 The password has to contain at least one lower case
150 * character.
151 * @return 7 The password has to contain at least one upper case
152 * character.
153 * @return 8 The password has to contain at least one numeric
154 * character.
155 * @return 9 The password has to contain at least one printable
156 * special character.
157 * @return 10 The password already is in history.
158 * @return 11 SNMPv3 USM is activated for the user and the
159 * password shall be used as auth passphrase. For this
160 * case, the password is too short (must be at least 8
161 * characters).
162 */
163 int setAccountPassword(in string password);
164
165 /**
166 * Update user information.
167 *
168 * @param password The new password; empty to leave unchanged
169 * @param info The new user information
170 *
171 * @return 0 OK
172 * @return 1 The new password has to differ from old password.
173 * @return 3 The password is too short.
174 * @return 4 The password is too long.
175 * @return 5 The password must not contain control characters.
176 * @return 6 The password has to contain at least one lower case
177 * character.
178 * @return 7 The password has to contain at least one upper case
179 * character.
180 * @return 8 The password has to contain at least one numeric
181 * character.
182 * @return 9 The password has to contain at least one printable
183 * special character.
184 * @return 10 The password already is in history.
185 * @return 11 SNMPv3 USM is activated for the user and the
186 * password shall be used as auth passphrase. For this
187 * case, the password is too short (must be at least 8
188 * characters).
189 * @return 12 An argument is invalid or out of range
190 * @return 13 The password passed in as SNMPv3 authentication pass
191 * phrase was wrong.
192 * @return 14 The ssh public key data is too large.
193 * @return 15 The ssh public key is invalid.
194 * @return 16 The ssh public key is not supported.
195 * @return 17 The ssh RSA public key is too short.
196 */
197 int updateAccountFull(in string password, in UserInfo info);
198
199 /**
200 * Get information and a list of granted privileges for a user.
201 *
202 * @param info %User information
203 * @param privileges List of granted privileges
204 */
206 out vector<Role.Privilege> privileges);
207
208 /**
209 * Sets the user preferences.
210 *
211 * @param prefs User Preferences
212 *
213 * @return 0 OK
214 * @return ERR_INVALID_ARGUMENT An argument is invalid or out of range
215 */
217
218 /**
219 * Gets the user capabilities.
220 *
221 * @return capabilities
222 */
224 };
225
226}
User interface
Definition User.idl:111
UserInfo getInfo()
Get user information.
constant int ERR_SSH_PUBKEY_DATA_TOO_LARGE
The ssh public key data is too large.
Definition User.idl:126
constant int ERR_PASSWORD_NEED_NUMERIC
The password must contain at least one numeric character.
Definition User.idl:120
constant int ERR_SSH_PUBKEY_NOT_SUPPORTED
The ssh public key is not supported.
Definition User.idl:128
constant int ERR_WRONG_PASSWORD
The passed-in password was wrong.
Definition User.idl:125
constant int ERR_PASSWORD_TOO_SHORT
The password is too short.
Definition User.idl:115
constant int ERR_PASSWORD_TOO_SHORT_FOR_SNMP
The password is too short to be used as SNMPv3 passphrase.
Definition User.idl:123
constant int ERR_PASSWORD_UNCHANGED
The new password must differ from the old password.
Definition User.idl:113
void getInfoAndPrivileges(out UserInfo info, out vector< Role::Privilege > privileges)
Get information and a list of granted privileges for a user.
constant int ERR_PASSWORD_NEED_LOWER
The password must contain at least one lower-case character.
Definition User.idl:118
constant int ERR_PASSWORD_TOO_LONG
The password is too long.
Definition User.idl:116
constant int ERR_PASSWORD_IN_HISTORY
The password is already in the password history.
Definition User.idl:122
constant int ERR_PASSWORD_EMPTY
The password must not be empty.
Definition User.idl:114
constant int ERR_PASSWORD_NEED_UPPER
The password must contain at least one upper-case character.
Definition User.idl:119
constant int ERR_SSH_RSA_PUBKEY_TOO_SHORT
The ssh RSA public key is too short.
Definition User.idl:129
constant int ERR_SSH_PUBKEY_INVALID
The ssh public key is invalid.
Definition User.idl:127
constant int ERR_PASSWORD_CTRL_CHARS
The password must not contain control characters.
Definition User.idl:117
int updateAccountFull(in string password, in UserInfo info)
Update user information.
int setAccountPassword(in string password)
Set the account password.
constant int ERR_PASSWORD_NEED_SPECIAL
The password must contain at least one special character.
Definition User.idl:121
constant int ERR_INVALID_ARGUMENT
Invalid arguments.
Definition User.idl:124
int setPreferences(in Preferences prefs)
Sets the user preferences.
UserCapabilities getCapabilities()
Gets the user capabilities.
User Management
Definition Role.idl:12
PressureEnum
Preferred display unit for (air) pressure sensors.
Definition User.idl:74
@ PASCAL
Pascal.
Definition User.idl:75
@ PSI
pound-force per square inch
Definition User.idl:76
SnmpV3PrivProto
SNMPv3 privacy protocol.
Definition User.idl:31
@ AES256_3DES
Use AES256 encryption with 3DES/Reeder key extension algorithm.
Definition User.idl:37
@ AES128
Use AES128 encryption.
Definition User.idl:33
@ AES192_3DES
Use AES192 encryption with 3DES/Reeder key extension algorithm.
Definition User.idl:36
@ AES192
Use AES192 encryption with Blumenthal key extension algorithm.
Definition User.idl:34
@ AES256
Use AES256 encryption with Blumenthal key extension algorithm.
Definition User.idl:35
@ DES
Use DES encryption.
Definition User.idl:32
SnmpV3AuthProto
SNMPv3 authentication protocol.
Definition User.idl:21
@ SHA224
Use HMAC-SHA224-128 for authentication.
Definition User.idl:24
@ SHA384
Use HMAC-SHA384-256 for authentication.
Definition User.idl:26
@ SHA256
Use HMAC-SHA256-160 for authentication.
Definition User.idl:25
@ SHA1
Use HMAC-SHA1-96 for authentication.
Definition User.idl:23
@ SHA512
Use HMAC-SHA512-384 for authentication.
Definition User.idl:27
@ MD5
Use HMAC-MD5-96 for authentication.
Definition User.idl:22
TemperatureEnum
Preferred display unit for temperature sensors.
Definition User.idl:62
@ DEG_F
Degrees Fahrenheit.
Definition User.idl:64
@ DEG_C
Degrees Celsius.
Definition User.idl:63
LengthEnum
Preferred display unit for length measurements, e.g.
Definition User.idl:68
@ FEET
Feet.
Definition User.idl:70
@ METER
Meters.
Definition User.idl:69
SnmpV3SecLevel
SNMPv3 security level.
Definition User.idl:14
@ NO_AUTH_NO_PRIV
No authentication and no privacy protocol.
Definition User.idl:15
@ AUTH_PRIV
Use both, authentication and privacy protocol.
Definition User.idl:17
@ AUTH_NO_PRIV
Use authentication but no privacy protocol.
Definition User.idl:16
Auxiliary user information.
Definition User.idl:55
string fullname
Full name.
Definition User.idl:56
string telephone
Telephone number.
Definition User.idl:57
string eMail
Email address.
Definition User.idl:58
User preferences
Definition User.idl:80
PressureEnum pressureUnit
Display unit for pressure sensors.
Definition User.idl:83
TemperatureEnum temperatureUnit
Display unit for temperature sensors.
Definition User.idl:81
LengthEnum lengthUnit
Display unit for length measurements.
Definition User.idl:82
SNMPv3 settings.
Definition User.idl:41
boolean haveAuthPassphrase
Authentication passphrase present.
Definition User.idl:46
boolean enabled
SNMPv3 enabled.
Definition User.idl:42
SnmpV3AuthProto authProtocol
Authentication protocol.
Definition User.idl:44
string privPassphrase
Privacy passphrase; cannot be read back.
Definition User.idl:51
SnmpV3SecLevel secLevel
Security level.
Definition User.idl:43
boolean useAuthPassphraseAsPrivPassphrase
Use authentication passphrase as privacy passphrase.
Definition User.idl:49
string authPassphrase
Authentication passphrase; cannot be read back.
Definition User.idl:47
SnmpV3PrivProto privProtocol
Privacy protocol.
Definition User.idl:48
boolean usePasswordAsAuthPassphrase
Use account password for SNMPv3 authentication.
Definition User.idl:45
boolean havePrivPassphrase
Privacy passphrase present.
Definition User.idl:50
User Capabilities Describe if certain operations can be performed for user.
Definition User.idl:105
boolean canSetPreferences
User preferences are modifiable.
Definition User.idl:107
boolean canSetPassword
User password is modifiable.
Definition User.idl:106
User information
Definition User.idl:87
AuxInfo auxInfo
Auxiliary user information.
Definition User.idl:93
boolean enabled
true if the account is enabled
Definition User.idl:88
boolean locked
true if the account cannot be deleted (r/o attribute)
Definition User.idl:89
boolean needPasswordChange
true to force a password change on the next login
Definition User.idl:91
boolean blocked
true if the account is blocked due to failed logins
Definition User.idl:90
Preferences preferences
User preferences
Definition User.idl:96
boolean forceLocalAuth
true if the account is always locally authenticated
Definition User.idl:92
vector< int > roleIds
List of role ids for this account.
Definition User.idl:97
string sshPublicKey
Public key for SSH access.
Definition User.idl:95
SnmpV3Settings snmpV3Settings
SNMPv3 settings.
Definition User.idl:94